package com.jdbc.entity;

/**
 * @author wzm
 * @create 2023-09-06 10:41
 * project_name:javaweb2308
 */

/**实体类    通常对应着数据库的表
 *   类的属性对应着表中的字段
 *   类的一个实例化对象对应着表中的一个记录
 */
public class Dog {
    //属性
    private  Integer id;
    private String name;
    private Integer age;
    private String sex;



    public Dog() {
    }

    public Dog(String name, Integer age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public Dog(Integer id, String name, Integer age, String sex) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
}
